<%@page language="java" pageEncoding="UTF-8"%>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<script type="text/javascript" src="${pageContext.request.contextPath}/fck/fckeditor.js"></script>
<HTML>
	<HEAD>
		<TITLE>添加馆内信息</TITLE>
		<LINK href="./jsp/manage/css/style.css" type=text/css rel=stylesheet>
		<script language="javascript" src="./jsp/manage/js/changedate.js"></script>
	</HEAD>

	<script type="text/javascript">
	function CheckForm(){
		var str=document.libnewsForm.title.value.replace(/\s+/g, '');
		if (str==''){
			alert('标题不能为空！');
			document.libnewsForm.title.focus();
			return false;
		}
		str=document.libnewsForm.newsfrom.value.replace(/\s+/g, '');
		if (str==''){
		   alert('馆内信息来源不能为空！');
		   document.libnewsForm.newsfrom.focus();
		   return false;
		}
		str=document.libnewsForm.newstype.value.replace(/\s+/g, '');
		if (str==''){
		   alert('馆内信息类型不能为空！');
		   document.libnewsForm.newstype.focus();
		   return false;
		}
	  return true;  
	}
	</script>
	<BODY topMargin=0 marginheight="0" marginwidth="0">
		<FORM name="libnewsForm" onSubmit="return CheckForm();"  method=post target=_self
			action="<%=request.getContextPath()%>/libnewsManage.do?method=libnewssave">
			<TABLE class=border cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
				<TBODY>
					<TR class=topbg>
						<TD height=22 colSpan=2 align=middle></TD>
					</TR>
					<TR align=middle>
						<TD>
							<TABLE cellSpacing=1 cellPadding=2 width="100%" border=0>
								<TBODY>
									<TR class=tdbg>
										<TD align=right width=9%>
											&nbsp;
										</TD>
										<TD colspan="2">
											<FONT color=#ff0000>
												<STRONG>注意<font color="#0000ff">*的内容必须填</font> </STRONG> 
											</FONT>
										</TD>
									</TR>
									<TR class=tdbg>
										<TD align=right width=9%>
											<STRONG> 标题 </STRONG>
										</TD>
										<TD colspan="2">
											<input id="title" maxlength=255 size=50 name="title">
											<FONT color=#ff0000>*</FONT>
										</TD>
									</TR>
									<TR class=tdbg>
										<TD align="right" width="4%">
											<STRONG>馆内信息来源 </STRONG>
										</TD>
										<TD colspan="1">
											<div align="left">
												<font color=blue> 
													<select name="libnewsfrom">
														<logic:iterate id="w" name="libnewsfrominfolist" indexId="count">
															<option value="${w[0]}">
																${w[1]}
															</option>
														</logic:iterate>
													</select> 
												</font>
											</div>
										</TD>
										<TD colspan="1">
											<STRONG> 馆内信息类型 </STRONG>
											<select name="libnewstype">
												<logic:iterate id="w2" name="libnewstypeinfolist" indexId="count2">
													<option value="${w2[0]}">
														${w2[1]}
													</option>
												</logic:iterate>
											</select>
										</TD>
									</TR>
									<TR class=tdbg >
										<TD align=right width=4%>
											<STRONG> 文章作者 </STRONG>
											<div align="left">
												<input name="writer" type="hidden" value="${writer}">
											</div>
										</TD>
										<TD colspan="1" class="my1">
											<div align="center">
												<font color=blue>${writer}</font>
											</div>
										</TD>
										<TD colspan="1" class="my1">
											<STRONG> 发布时间 </STRONG>
											<input name="pubdate" id="pubdate" value="" size="17" onclick='popUpCalendar(this, this, &quot;yyyy-mm-dd&quot;)' />
										</TD>
									</TR>
									<TR class=tdbg id=ArticleContent>
										<TD vAlign=center align=right width=9%>
										</TD>
										<TD colspan="10">
										<FCK:editor instanceName="libnewscontent" height="400px">
											<jsp:attribute name="value">
											</jsp:attribute>
											<jsp:body>
												<FCK:config FullPage="true"/>
											</jsp:body>
										</FCK:editor>
										</TD>
									</TR>
								</TBODY>
							</TABLE>
						</TD>
					</TR>
				</TBODY>
			</TABLE>
			<P align=center>
				<INPUT id="Save" style="CURSOR: hand" type="submit" value="添加" name="Save">
				<INPUT id="Cancel" style="CURSOR: hand" type="reset" value="取消" name="Cancel" 
					onclick="window.location.reload('<%=request.getContextPath()%>/libnewsManage.do?method=libnewslist') " >
			</P>
			<BR>
		</FORM>
	</BODY>
</HTML>
